package com.best.design.observer.step3;

import com.best.design.observer.step1.MinibusTargetService;

import java.util.Date;

public class LotteryServiceImpl extends LotteryService {

	private MinibusTargetService minibusTargetService = new MinibusTargetService();

	@Override
	protected LotteryResult doDraw(String uId) {
		// 摇号
		String lottery = minibusTargetService.lottery(uId);
		// 结果
		return new LotteryResult(uId, lottery, new Date());
	}

}